Add a patch to fix JavaScript tests with gjs 1.50.0
authorSimon McVittie <smcv@debian.org>
Fri, 15 Sep 2017 14:34:00 +0000 (15:34 +0100)
committerSimon McVittie <smcv@debian.org>
Fri, 15 Sep 2017 14:43:39 +0000 (15:43 +0100)
It is more strict about 'let'.

debian/changelog
debian/patches/Fix-JavaScript-tests-with-gjs-1.50.0.patch [new file with mode: 0644]
debian/patches/series

index c271ff80a81c909ea7442780f3764ac06a5477a3..1eac49c4732836de454584b574233b03d3601cf4 100644 (file)
@@ -9,6 +9,8 @@ ostree (2017.11-1) UNRELEASED; urgency=medium
     into source tree. Upstream distributes it again.
   * Add a patch to fix the new test-help.sh when ostree trivial-httpd
     is enabled. At the moment we still build that tool.
+  * Add a patch to fix JavaScript tests with gjs 1.50.0, which is
+    more strict about 'let'
 
  -- Simon McVittie <smcv@debian.org>  Wed, 30 Aug 2017 10:09:26 +0100
 
diff --git a/debian/patches/Fix-JavaScript-tests-with-gjs-1.50.0.patch b/debian/patches/Fix-JavaScript-tests-with-gjs-1.50.0.patch
new file mode 100644 (file)
index 0000000..f92ff12
--- /dev/null
@@ -0,0 +1,42 @@
+From: Simon McVittie <smcv@collabora.com>
+Date: Fri, 15 Sep 2017 15:32:55 +0100
+Subject: Fix JavaScript tests with gjs 1.50.0
+
+In recent gjs, you can't declare a variable with "let" multiple times.
+
+Signed-off-by: Simon McVittie <smcv@collabora.com>
+---
+ tests/corrupt-repo-ref.js | 2 +-
+ tests/test-sysroot.js     | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/corrupt-repo-ref.js b/tests/corrupt-repo-ref.js
+index c5f2806..a2085f3 100755
+--- a/tests/corrupt-repo-ref.js
++++ b/tests/corrupt-repo-ref.js
+@@ -47,7 +47,7 @@ function listObjectChecksumsRecurse(dir, allObjects) {
+     e.close(null);
+ } 
+-let [,commit] = repo.resolve_rev(refToCorrupt, false);
++repo.resolve_rev(refToCorrupt, false);
+ let [,root,commit] = repo.read_commit(refToCorrupt, null);
+ let allObjects = {};
+ allObjects[commit + '.commit'] = true;
+diff --git a/tests/test-sysroot.js b/tests/test-sysroot.js
+index 40397fe..e7250a8 100755
+--- a/tests/test-sysroot.js
++++ b/tests/test-sysroot.js
+@@ -97,9 +97,9 @@ assertEquals(deploymentPath.query_exists(null), false);
+ //// Ok, redeploy, then add a new revision upstream and pull it
+-let [,deployment] = sysroot.deploy_tree('testos', rev, origin,
+-                                      mergeDeployment, null,
+-                                      null);
++[,deployment] = sysroot.deploy_tree('testos', rev, origin,
++                               mergeDeployment, null,
++                               null);
+ newDeployments = deployments;
+ deployments = null;
+ newDeployments.unshift(deployment);
index 913d54edc24a3a0f36df52ae50011a0f22533175..9c0cba77e26dafa8f08e39c67ec06e3c6744b6eb 100644 (file)
@@ -1 +1,2 @@
 Fix-test-help.sh-for-the-case-where-ostree-trivial-httpd-.patch
+Fix-JavaScript-tests-with-gjs-1.50.0.patch